package cn.skyquant.quant4j.api.ylzc;

import cn.skyquant.quant4j.sdk.enums.YlzcType;
import cn.skyquant.quant4j.sdk.util.time.CalendarUtils;

public final class ZigZag {
    public final YlzcType type;
    public final double value;
    public final long time;
    public final int index;

    public ZigZag(YlzcType type, double value, long time, int index) {
        this.type = type;
        this.value = value;
        this.time = time;
        this.index = index;
    }

    @Override
    public String toString() {
        return "{" + CalendarUtils.formatSimple(time) + ":" +type.name() + ":" + value + "}";
    }
}
